﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OnlineGames
{
    public class cl_0423_Player
    {
        private string body;
        private string costume;
        private string weapon;
        private cl_0423_Weapon Weapons;
        private cl_0423_State state;//状态
        private string name;//游戏玩家昵称

        public void add(cl_0423_Weapon weapons)
        {
            this.Weapons = weapons;
        }

        public void use()
        {
            Console.WriteLine("玩家领取，准备使用武器");
            this.Weapons.use();
        }

        public cl_0423_Player() { }
        
        public cl_0423_Player(string name)
        {
            this.name = name;
            this.state = new cl_0423_NormalState(this);
            Console.WriteLine(this.name+"进入游戏：");
            
        }

        public cl_0423_State cl_0423_State
        {
            get => default;
            set
            {
            }
        }

        public cl_0423_Weapon cl_0423_Weapon
        {
            get => default;
            set
            {
            }
        }

        public string getBody()
        {
            return this.body;
        }

        public void setBody(string body)
        {
            this.body = body;
        }

        public string getCostume()
        {
            return this.costume;
        }

        public void setCostume(string costume)
        {
            this.costume = costume;
        }

        public string getWeapon()
        {
            return this.weapon;
        }

        public void setWeapon(string weapon)
        {
            this.weapon = weapon;
        }

        public void pause()
        {
            state.pause();
        }

        public void start()
        {
            state.start();
        }

        public void beAttacked()
        {
            state.beAttacked();
        }

        public void shot()
        {
            state.shot();
        }

        public void move()
        {
            state.move();
        }

        public string getName()
        {
            return this.name;
        }

        public cl_0423_State getState()
        {
            return this.state;
        }

        public void setState(cl_0423_State state)
        {
            this.state = state;
        }
    }
}